﻿using DiscreteMath.Tests;
using DiscreteMath;
//using DiscreteMath.WebApp;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
[assembly: CLSCompliant(true)]

namespace DimitroffTest
{
	class Program
	{
		static void Main()
		{

            NondeterministicAutomaton machine = AutomataFactory.Factory.ContainsEitherBBorBAB;
            //var text = JsonConverter.ToJson(machine.Device);

            var text = JsonConvert.SerializeObject(machine);
			var settings = new JsonSerializerSettings() 
				{ 
					//ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, 
						
				};
			var thingy = JsonConvert.DeserializeObject<NondeterministicAutomaton>(text, settings);
            Console.WriteLine(text);
        }
    }
}
